﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InformationSystem.BLL.Core.Model;

namespace InformationSystem.BLL.Core.Dao
{
    public interface IInformationDao
    {
        bool SendMail(Mail mail);
        bool SaveMail(Mail mail);
        IList<Mail> GetMailSendList(string sendUserID);
        IList<Mail> GetMailRecvList(string recvuserID);
        IList<Mail> GetMailDraftList(string senduserID);
        bool DeleteMailSent(int mailID, string senduserid);
        bool DeleteMailAttachment(int mailID);
        bool UpdateMailStatus(int mailID, MailStatus mailstatus);
        bool DeleteMailRecvd(int mailID, string recvuserid);
        Mail GetMailDetailByID(int mailID);
        IList<Attachment> GetMailAttachments(int mailID);
        Attachment GetMailAttachment(int mailid, int fileid);
        IList<RecvUser> GetMailRecvUserList(int mailID);
        int GetMailUnreadCount(LoginUser user);
        void UpdateMailRead(int maiID, string userid);

        bool SendAffiche(Affiche affiche);
        bool DeleteAfficheByID(int afficheID);
        IList<Affiche> GetRecvAfficheList(LoginUser user,int recordcount);
        IList<Affiche> GetSentAfficheList(LoginUser user);
        IList<RecvUser> GetAfficheReadList(int afficheid);
        Affiche GetAffiche(int afficheid);
        IList<Attachment> GetAfficheAttachments(int afficheid);
        Attachment GetAfficheAttachment(int afficheid, int fileid);
        void UpdateAfficheUserReadStatus(int afficheid, LoginUser user);

        bool SendWorkInfo(WorkInfo workinfo);
        bool DeleteWorkInfoByID(int workInfoid);
        IList<WorkInfo> GetRecvWorkInfoList(LoginUser user, int recordcount);
        IList<WorkInfo> GetSentWorkInfoList(LoginUser user);
        WorkInfo GetWorkInfo(int workInfoid);
        IList<RecvUser> GetWorkInfoReadList(int workinfoid);
        IList<Attachment> GetWorkInfoAttachments(int workInfoid);
        Attachment GetWorkInfoAttachment(int workInfoid, int fileid);
        void UpdateWorkInfoUserReadStatus(int workInfoid, LoginUser user);

        bool SendMsg(Msg msg);
        IList<Msg> GetMsgSendList(string sendUserID);
        IList<Msg> GetMsgRecvList(string recvuserID, int recordcount);
        bool DeleteMsgSent(int msgID);
        Msg GetMsgDetailByID(int msgID);
        Attachment GetMsgAttachment(int msgid, int fileid);
        IList<Attachment> GetMsgAttachments(int msgID);
        IList<RecvUser> GetMsgRecvUserList(int msgID);
        IList<RecvUser> GetMsgReadList(int msgid);
        IList<RecvUser> GetMsgUnReadList(int msgid);
        void UpdateMsgUserReadStatusToRead(int msgid, string userid);
        void ReplyMsg(int msgid, LoginUser user, string content);
        IList<MsgReplyInfo> GetMsgReplyInfoList(int msgid);

        int GetAfficheCountInGrade(LoginUser user);
    }
}
